[tool:pytest]
python_files = test_*.py
python_functions = test_*
python_classes = *Test Test*
filterwarnings =
    ignore::DeprecationWarning
    ignore::FutureWarning
log_level = INFO
markers =
    freeze_time: pytest-freezegun
addopts = -v --testdox
env = S3_ACCESS_KEY=ROOTUSE3
    S3_SECRET_ACCESS_KEY=CHANGEME123
    S3_URL=http://localhost:9000
    S3_BUCKET=testdata

[pylint]
good-names=i,j,k,e,x,y,m,_,es
max-module-lines=300
max-line-length=120
output-format = colorized
generated-members=pydantic
ignored-classes=mlcore_proto.v1beta.job_service_pb2.Job
extension-pkg-whitelist=lru,pydantic.error_wrappers,pydantic.dataclasses
signature-mutators=pytest.fixture
enable=use-symbolic-message-instead,R

disable=
    C0103, ; Constant name "logger" doesn't conform to UPPER_CASE naming style (invalid-name)
    C0111, ; Missing module docstring (missing-docstring)
    E0213, ; Method should have "self" as first argument (no-self-argument) - N805 for flake8
    R0201, ; Method could be a function (no-self-use)
    R0903, ; Too few public methods (m/n) (too-few-public-methods)
    W0511, ; Fixme
    W0123, ; Eval
    C0330, ; Wrong hanging indentation before block (add 4 spaces)
    W0621, ; (redefined-outer-name)
    W1202, ; Use percent formatting in logging functions and pass the percent parameters as arguments
    W0703, ; Catching too general exception Exception
    E0611, ; No name in module
    R0913, ; Too many arguments
    R1702, ; Too many nested blocks (8/5) (too-many-nested-blocks)
    R0912, ; Too many branches
    R0915, ; Too many statements
    C0302, ; Too many lines in module
    R0902, ; Too many instance attributes
    C0415, ; Import outside toplevel
    duplicate-code, ; unfortunately, min-similarity-lines doesn`t work

ignore=
    data

[flake8]
max-arguments = 10
max-cognitive-complexity = 13
show-source = True
max-line-length = 99
max-methods = 10
max-awaits = 8
inline-quotes = "
allowed-todo-synonyms = todo
disallowed-todo-synonyms = TODO, ToDo, Todo

ignore =
    # Missing docstring in public module
    D100,
    # Missing docstring in public package
    D104,
    # Missing docstring in __init__
    D107,
    # Found upper-case constant in a class. - Rule not valid for Enum
    WPS115,
    # Forbid too many arguments for a function or method
    WPS211,
    # Forbid f strings
    WPS305,
    # Forbid writing classes without base classes (object).
    WPS306,
    # Forbid percent-formatting on strings - false positive at logging
    WPS323,
    # first argument of a method should be named 'self' - false positive in validator
    N805,
    # missing trailing comma - and what?
    C812,
    # No docstring in public module
    D202,
    # No docstring in public class
    D203,
    # No docstring in public method
    D205,
    # No docstring in function
    D212,
    # First word of docstring should be properly capitalized
    D400,
    # First line of docstring should end with a period
    D401,
    # First line of docstring should be a short summary
    D402,
per-file-ignores =
    # WPS213 Found too many expressions:
    app/deps.py: WPS213
    # D: flake8-docstrings
    # S101: Use of assert detected
    # WPS214 Found too many methods
    # WPS442: Found outer scope names shadowing
    # WPS317: Found incorrect multi-line parameters (parametrize)
    # WPS218: Found too many `assert` statements
    # WPS202: Found too many module members
    tests/*: D,S101,WPS214,WPS442,WPS317,WPS218,WPS202

[tool:isort]
include_trailing_comma=True
known_first_party=tests
line_length = 99
multi_line_output=3
